package ooday05;
import java.util.Timer;//计时器
import java.util.TimerTask;//定时任务
public class TestDemo {
    public static void main(String[] args) {
        Timer timer=new Timer();
        int time=1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("1");
            }
        },time,time);
    }


}
